/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package fisica;

import hibernate.Sesion;
import hibernate.objeto.Domicilio;
import hibernate.objeto.Triage;
import org.hibernate.Query;

/**
 *
 * @author Gonzalo
 */
public class TriageFisica extends CapaFisica {

    /**
     * Retorna el objeto Triage según el id.
     *
     * @param idTriage El id del triage
     * @return El objeto Triage consultado, null si no existe
     */
    public static Triage getTriagePorId(int idTriage) {
        Query q = Sesion.sesion.createQuery(
                "from Triage " +
                "where idTriage = " + idTriage
                );

        return (Triage) getObjeto(q);
    }

}
